import { BasicColumn, FormSchema } from '/@/components/Table';
// import { render } from '/@/utils/common/renderUtils';

/**
 * 查询字段
 */
export const searchFormSchema: FormSchema[] = [
  {
    label: '报关单号',
    field: 'id',
    component: 'JInput',
    colProps: { span: 6 },
  },
  {
    label: '起运港口',
    field: 'departureCountry',
    component: 'JInput',
    colProps: { span: 6 },
  },
  {
    label: '抵达港口',
    field: 'destinationCountry',
    component: 'JInput',
    colProps: { span: 6 },
  },
  {
    label: '报关日期',
    field: 'departureTime',
    component: 'DatePicker',
    colProps: { span: 6 },
  },
  {
    label: '运输方式',
    field: 'dept',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'transportation_mode',
      stringToNumber: true,
    },
    colProps: { span: 6 },
  },
  {
    label: '货物重量',
    field: 'goodsPrice',
    component: 'JInput',
    colProps: { span: 6 },
  },
  {
    label: '货物单位',
    field: 'goodsUnit',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'cargo_unit',
      stringToNumber: true,
    },
    colProps: { span: 6 },
  },
  {
    label: '货物名称',
    field: 'goodsName',
    component: 'JInput',
    colProps: { span: 6 },
  },
  {
    label: '货物描述',
    field: 'goodsDesc',
    component: 'JInput',
    colProps: { span: 6 },
  },
  {
    label: '所属公司',
    field: 'subordinateCompany',
    component: 'JInput',
    colProps: { span: 6 },
  },
  {
    label: '联系人',
    field: 'linkManId',
    component: 'JInput',
    colProps: { span: 6 },
  },
  {
    label: '联系人电话',
    field: 'cName',
    component: 'JInput',
    colProps: { span: 6 },
  },
  {
    label: '押运人',
    field: 'supercargoId',
    component: 'JInput',
    colProps: { span: 6 },
  },
  {
    label: '押运人电话',
    field: 'cName',
    component: 'JInput',
    colProps: { span: 6 },
  },
];
/**
 * 表格数据
 */
export const columns: BasicColumn[] = [
  {
    title: '序号',
    dataIndex: '',
    key: 'rowIndex',
    width: 60,
    align: 'center',
    customRender: ({ index }) => {
      return parseInt(index) + 1;
    },
  },
  {
    title: '报关单号',
    dataIndex: 'customsDeclarationId',
    width: 120,
  },
  {
    title: '报关日期',
    dataIndex: 'standardTime',
    width: 100,
  },
  {
    title: '起运',
    dataIndex: 'utcTiming',
    width: 120,
  },
  {
    title: '抵达',
    dataIndex: 'longitude',
    width: 80,
  },
  {
    title: '货物名称',
    dataIndex: 'latitude',
    width: 100,
  },
  {
    title: '货物描述',
    dataIndex: 'temperature',
    width: 100,
  },
  {
    title: '货物数量',
    dataIndex: 'humility',
    width: 100,
  },
  {
    title: '货物单位',
    dataIndex: 'type',
    width: 100,
  },
  {
    title: '所属公司',
    dataIndex: 'data',
    width: 100,
  },
  {
    title: '联系人',
    dataIndex: 'detectResult',
    width: 100,
  },
  {
    title: '押运员',
    dataIndex: 'schedule',
    width: 100,
  },
];
/**
 * 表单数据
 */
export const formSchema: FormSchema[] = [
  {
    label: '报关单号',
    field: 'customsDeclarationId',
    component: 'Input',
  },
  {
    label: '报关日期',
    field: 'standardTime',
    component: 'DatePicker',
  },
  {
    label: '起运',
    field: 'utcTiming',
    component: 'Input',
  },
  {
    label: '抵达',
    field: 'longitude',
    component: 'Input',
  },
  {
    label: '货物名称',
    field: 'latitude',
    component: 'Input',
  },
  {
    label: '货物描述',
    field: 'temperature',
    component: 'Input',
  },
  {
    label: '货物数量',
    field: 'humility',
    component: 'Input',
  },
  {
    label: '货物单位',
    field: 'goodsUnit',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'cargo_unit',
      stringToNumber: true,
    },
  },
  {
    label: '所属公司',
    field: 'data',
    component: 'Input',
  },
  {
    label: '联系人',
    field: 'detectResult',
    component: 'Input',
  },
  {
    label: '押运员',
    field: 'schedule',
    component: 'Input',
  },
];
